package com.huaweicloud.haydn.delivercore.agent.utils;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * 功能描述
 *
 * @since 2023-02-03
 */
public class DateUtil {

    public static String getPreDay() {
        SimpleDateFormat ymd = new SimpleDateFormat("yyyy-MM-dd");
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(new Date());
        calendar.add(Calendar.DATE, -1);
        Date time = calendar.getTime();
        return ymd.format(time) + " 23:59:59";
    }
}
